Password self encryption method and system and encryption by keys generated from personal secret information

ABSTRACT

A public key cryptographic system and method is provided for a password or any other predefined personal secret information that defeats key factoring and spoofing attacks. The method adopts a new technique of encrypting a password or any predefined secret information by a numeric function of itself, replacing the fixed public key of the conventional RSA encryption. The whole process involving key generation, encryption, decryption and password handling is discussed in detail. Mathematical and cryptanalytical proofs of defeating factoring and spoofing attacks are furnished.

CROSS REFERENCE TO RELATED APPLICATION(S)

The present application claims the priority of U.S. provisional patent application Ser. No. 61/056,991, filed on May 29, 2008 inventor and applicant Cheman Shaik; and the present application is a divisional of and claims the priority of U.S. patent application Ser. No. 12/170,506, filed on Jul. 10, 2008, which issued as U.S. Pat. No. 7,522,723, issued on Apr. 21, 2009, inventor and applicant Cheman Shaik.

FIELD OF THE INVENTION

This invention relates to cryptographic systems, computers, and computer-implemented methods for performing encryption and decryption operations.

BACKGROUND OF THE INVENTION

Password encryption is a paramount requirement to control access to web applications and protect confidential information. A password in clear text is vulnerable to interception and eavesdropping on the Internet, which may result in significant information and financial loss to its owner. Public key encryption algorithms that are in use today provide computationally unbreakable encryption to passwords, as discussed in “A Web-only Primer on Public-key Encryption”. Though these algorithms are perceived to be unbreakable with today's possible computational speeds, there lies no guarantee that the same situation will continue in future, taken into consideration various factors such as the level of currently ongoing academic research to break these algorithms, continuously increasing processing power of computers, and the application of parallel processing techniques and quantum computers to factorize large numbers (see “Public-Key Cryptography”, and Nielsen, Michael A. and Chuang, Isaac L., “Quantum Computation and Quantum Information”, Cambridge University Press, Cambridge, 2000).

None of the proven public key cryptosystems as of today provide absolute security, that is, never-breakable security. The most well known and widely implemented public key cryptosystem for information security is the RSA algorithm, whose security lies in the difficulty of factoring the key modulus into its primes (see “Modular Mathematics”, RSA cryptography. “RSA” stands for the surnames of Ron Rivest, Adi Shamir, and Leonard Adelman, who publicly described the RSA algorithm or method in 1977. If someone invents in the future a trivial factoring technique for large numbers, it will mark the end of the RSA cryptosystem, resulting in a drastic impact on e-commerce and e-banking activities.

Further, public key cryptosystems are vulnerable to spoofing attacks (see “The Pure Crypto Project”, Remarks on Security, which can be easily crafted by a man-in-the-middle. A spoofed public key can render an otherwise secure communication insecure (see “Easy Fast Efficient Certification Technique). These attacks are not computationally intensive in nature unlike factoring attacks. Spoofing attacks can be mounted in real time without requiring any sophisticated computing infrastructure. Though web browsers verify the authenticity of public keys and provide alerts to users on mismatching keys, most users are unaware of the subject matter and technically not sound enough to understand the seriousness of the problem and be vigilant to notice spoofing attacks.

Research was done in the past to devise public key cryptographic techniques that survive private key compromise attacks (see Cheman Shaik, “Robust Public Key Cryptography—a New Crypto System Surviving Private Key Compromise. Proceedings of the Second European Conference on Computer Network Defense). However, more research needs to be done in the direction of developing new password encryption techniques that withstand factoring and key spoofing attacks.

SUMMARY OF THE INVENTION

One or more embodiments of the present invention relate to a cryptographic system, method, and/or apparatus that survives spoofing and factoring attacks on encryption keys used to encrypt password or any other predefined personal secret information. One or more embodiments also enable implementation of digital certificates for customers without issuing large unmemorable numeric keys for achieving non-repudiation. Further, dependency on certifying authorities for confirming authenticity of keys is eliminated. Another great advantage, for one or more embodiments of the present invention is that RSA encryption can be continued for encrypting passwords of existing users of a web application even after the cryptosystem is broken in the future by any trivial factorization technique for large numbers.

A process for generating a key or keys in accordance with an embodiment of the present invention may be as follows:

-   -   (a) A server computer may select a defined password of a user         from a web application's user table stored in a computer server         database.     -   (b) The server computer may convert the password to an integer x         using any text-to-number conversion scheme.     -   (c) The server computer may compute a public key exponent e=f(x)         where f(x) is any function of x that results in an odd integer         for e.     -   (d) The server computer may select a prime number p such that         p−1 and e are relative primes.     -   (e) The server computer may select another prime number q such         that q−1 and e are relative primes.     -   (f) The server computer may compute Euler Totient Function         φ=(p−1)(q−1).     -   (g) The server computer may compute a private key exponent d         such that e d=kφ+1.     -   (h) The server computer may compute the key modulus n=pq.     -   (i) The server computer may discard x, e, p, q and φ to garbage,         leaving no record thereof, such as by permanently deleting the         variables.     -   (j) The server computer may store d and n in a user table         against the password.

A process for generating a private key exponent d in accordance with an embodiment of the present invention requires that a public key exponent e be selected first, and then two suitable primes p and q be selected as described in the steps c, d and e above. This is procedurally different from the conventional RSA keys generation method in which primes p and q are selected first, and then suitable e is selected to achieve shorter computation time.

A process for encrypting password in accordance with an embodiment of the present invention may be as follows:

-   -   (a) A user at a user or client computer may enter his userid and         password in an authentication web page.     -   (b) The user may submit only a userid (user identification) from         the client computer to the server computer while retaining the         password in the web page.     -   (c) The server computer may receive the userid, retrieve the RSA         key modulus n for that particular userid from a user table         stored in server database and may pass it to the user's web         page.     -   (d) The user or client computer converts his password to the         same integer x as done on the server computer using the same         text-to-number conversion scheme used by the server computer.     -   (e) The user or client computer computes his public key exponent         e=f(x) where f(x) is the same function of x used on the server         computer that results in an odd integer for e.     -   (f) The user or client computer performs randomized padding of         the password and converts the resulting text to a number x_(p)         using any text-to-number conversion scheme.     -   (g) The user or client computer computes password cipher C=x_(p)         ^(e) mod n.     -   (h) The user or client computer submits both userid and password         cipher to the server computer.

In the present application, the terms user computer and client computer are used interchangeably.

A process for decryption in accordance with an embodiment of the present invention may be as follows:

-   -   (a) The server computer may capture the userid and password         cipher received at the server computer from the client computer.     -   (b) The server computer may retrieve d and n from a user table         stored in its database for the received userid.     -   (c) The server computer may decrypt the password cipher C into         x_(p) as follows:         x_(p)=C^(d) mod n.     -   (d) The server computer may convert x_(p) back to the padded         text password by reverse conversion.     -   (e) The server computer may remove padding and extract the         original text password.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a block diagram of an apparatus for use with an embodiment of the present invention;

FIG. 2 shows a block diagram of a cryptographic process for use with the apparatus of FIG. 1, in accordance with an embodiment of the present invention;

FIG. 3 shows a block diagram of a user identification and password handling method for use with the apparatus of FIG. 1 in accordance with an embodiment of the present invention; and

FIG. 4 shows a flow chart of a decryption method in accordance with an embodiment of the present invention.

DETAILED DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a block diagram of an apparatus 1 for use with an embodiment of the present invention. The apparatus 1 includes a server computer 2 and a client computer 4. The server computer 2 and the client computer 4 are connected by a communications link 2 a.

FIG. 2 shows a block diagram 100 of a cryptographic process for use with the apparatus 1 of FIG. 1, in accordance with an embodiment of the present invention. The process shown by diagram 100 can be executed by a computer program running on the server computer 2. The process of diagram 100, begins at step 102, at which the server computer 2 selects a defined password of a user from a web application's user table which is located in database or flat file of the server computer 2. The server computer 2 next converts the password into an integer number x at step 104. The conversion of a password to a number may be done in various ways by the server computer 2. For example, the server computer 2 may use a conversion scheme like 01 for a, 02 for b, . . . 26 for z, 27 for A, . . . 52 for Z, 53 for the number 1, 54 for number 2, . . . and so on. But there is no hard and fast rule for this scheme. Every server computer, such as server computer 2, may use its own conversion scheme, but a computer programmer should ensure that the same password conversion scheme is used on both the server computer 2 side and client computer 4 side. Another point note-worthy here is that this conversion scheme need not be kept secret. It can be even publicly revealed. It does not affect the security of encryption. Also, in a public key cryptosystem, even the encryption and decryption process and formula can be completely revealed. The only thing that needs to be kept confidential is the private key. The actual security of RSA encryption lies in the difficulty of factoring the key modulus.

The server computer 2 next computes an odd public key exponent e=f(x) where f(x) is any function of x that results in an odd integer for e, at step 106. The server computer 2 next selects a prime number p at step 108. At step 110 it is determined if the greatest common divisor between e and p−1 is 1 to ensure that e and p−1 are relative primes. If not then a different prime number is selected for p, for an otherwise repeated step 108. Step 110 is then repeated. This continues until the greatest common divisor of e and p−1 is equal to 1.

At step 112 the server computer 2 selects a prime number q. At step 114 it is determined if the greatest common divisor between e and q−1 is equal to 1. If the answer is no then another prime number q is selected and step 114 is repeated. If the answer is yes then the key modulus n=pq, i.e. p times q, is determined by the server computer 2. At step 118 the server computer 2 computes the Euler Totient Function φ=(p−1)(q−1). At step 120, the server computer 2 determines the private key exponent d such that ed=kφ+1 using Euclid's algorithm.

At step 122, x, p, q, e and φ are discarded by server computer 2, leaving no record thereof. At step 124 d and n are stored in a user table record in database of server computer 2 with a specific d and n for a specific password. In one embodiment of the present invention, the same process is followed for every password.

FIG. 3 shows a block diagram 200 of a user identification and password handling method for use with the apparatus of FIG. 1 in accordance with an embodiment of the present invention. At step 202 a user enters his or her user identification (ID) and password in an authentication web page on a client computer 4. The user submits the user identification (ID) from the client computer 4 to the server computer 2. In accordance with an embodiment of the present invention the user submits only the user identification while retaining the password in the web page on the client computer 4, though both values are entered. The server computer 2 receives the user identification from the client computer 4 and retrieves the RSA key modulus n from database or flat file of the server computer 2 for that particular user identification and passes it to the user's web page on the client computer 4, at step 204.

At step 206, the client computer 4 converts the user's password to the same integer x as done on the server computer. At step 208, the client computer 4 computes the user's odd public key exponent e=f(x) where f(x) is the same function used on the server computer 2. For example, in a typical hotmail scenario, a hotmail user enters his user id and password in the hotmail login page for opening his mail box. Unlike the conventional hotmail page which submits both user id and password at a time to the hotmail server, this encryption applied in hotmail login page submits only the user id (or login id) to the hotmail server when a user clicks ok button, though he enters both user id and password. The password is still retained in the hotmail login page on the user's laptop or personal computer. Subsequently, for the received user id, the hotmail server retrieves the user's key modulus n and returns it to the user's login page. The program logic in the hotmail login page on the client laptop or pc encrypts the retained password with this key modulus n and the public key exponent e calculated in the login page itself on the user's pc or laptop, because e is a function of password itself.

At step 210, the client computer 4 performs randomized padding of the password and converts it to a number x_(p). At step 212 the client computer 4 computes password cipher C=x_(p) ^(e) mod n which is an encryption of x_(p). At step 214 the client computer 4 submits both the user id and the password cipher, C, to the server computer 2. Generally, a cipher means a resulting scrambled text after encryption.

This special functionality of submitting user id alone from the client computer, requesting the key modulus from the server computer, and encrypting with it the password can be achieved through computer programming with advanced AJAX (Asynchronous Java Script) techniques using JavaScript, DHTML (dynamic hypertext markup language) and hidden HTML (hypertext markup language) frames. Alternatively, user id and password may be entered in two different successive web pages. When the first web page is submitted with user id, the server computer 2 sends a web page containing the key modulus n of the user with a text box for entering password.

An RSA based password encryption method or one or more embodiments of the present invention, protects passwords from both key breaking and spoofing attacks. In at least one embodiment, every password of a web application, such as run by the server computer 2 is converted to an RSA public key exponent through a numerical transformation and mathematical computation at steps 104 and 106 of FIG. 2 respectively. The same procedure is followed by the user at the client computer 4 at steps 206 and 208 of FIG. 3 to transform password into a number and compute the public key exponent. Deviating from the conventional RSA key generation process, which starts with selecting two primes p and q, the server computer 2 in accordance with an embodiment of the present invention is programmed to first compute the public key exponent e at step 106 of FIG. 2 as a function of the password itself. Subsequently, the server computer 2 is programmed to select two primes p and q such that both p−1 and q−1 are relatively primes to the public key exponent. Finally, the decryption exponent d is computed by the server computer 2 at step 120 of FIG. 2 satisfying the governing RSA keys generation eqn. e d=kφ+1, where k is an integer and φ is the Euler Totient Function, which is equal to (p−1)(q−1) (regarding general RSA key generation see R. Rivesi, A. Shamir, and L. Adleman “A method of obtaining digital signature and public key cryptosystems, Communications of the ACM, 21: 121-126, 1978).

FIG. 4 shows a flow chart 300 for a decryption method to be performed by the server computer 2 of FIG. 1. At step 302, the server computer 2 captures the userid and password cipher submitted from a client computer 4. At step 304 the server computer 2 retrieves d and n from a user table in database or flat file of the server computer 2 for the received user id. At step 306 the server computer 2 decrypts the password cipher C to x_(p) as follows: x_(p)=C^(d) mod n. At step 308, the server computer 2 converts x_(p) back to the padded text password. The server computer 2 removes padding and extracts the original text password at step 310. While converting x_(p) back to the padded text password, reverse conversion should be done appropriately. For example, if ‘a’ in the padded text password is converted to ‘01’ in x_(p), then ‘01’ in x_(p) should be reversed to ‘a’ in the padded text password.

In the following paragraphs, the security strength of the encryption against factoring and spoofing attacks is analyzed and justified with supporting mathematical and logical arguments.

The following deals with factoring attacks. In case an attacker becomes successful in factoring the key modulus n into two primes p and q, he will be in a position to trivially compute the Euler Totient Function φ. Consequently, if the public key exponent e is known, as is the case with conventional RSA encryption, the private key exponent d can be computed by running Euclid's algorithm on e and φ. However, in this case e is not revealed to the public as it is not passed from server computer 2 to the client or user computer 4. Advantageously, it is designed as a function of the password itself and recomputed on the client computer 4. Hence, the attacker needs to sift through the entire password space attempting exhaustive brute-force attacks.

The aforementioned strength of the password self encryption method will keep web based authentication and online e-commerce transactions safe from threats in the future even if RSA cryptosystem is broken by inventing any real-time/trivial factorization techniques. Authentication by existing users can still be trusted and continued, although new users can not be accepted.

The following deals with Key Spoofing Attacks. Key spoofing is replacing of an original public key with a fraudulent public key by an attacker during its transmission from a server computer, such as computer 2, to a client computer, such as 4. Unaware of the attack, the victim encrypts his password with a fraudulent public key and submits it to the server computer, such as computer 2. The submitted password cipher is intercepted in the middle and decrypted with the pairing fraudulent private key already known to the attacker.

Password self encryption, in accordance with one or more embodiments of the present invention, defeats spoofing attacks due to the elimination of open public key exponents. The only accessible part of the public key for an attacker is the key modulus n, which could be the target for spoofing. The targeted user encrypts his password as follows with the new modulus n_(s) introduced by the attacker replacing the original modulus n, and the public key exponent e derived from the password itself: C_(s)=x_(p) ^(e) mod n_(s) When the attacker intercepts the spoof-encrypted cipher, he decrypts the same as follows: X_(p-spoof)=C_(s) ^(d) ^(s) mod n_(s)

In order to achieve the equality x_(p-spoof)=x_(p) the attacker's private key exponent d_(s) must satisfy the governing key generation equation e d_(s)=kφ_(s)+1, where p_(s) and q_(s) are prime factors of n_(s), and φ_(s)=(p_(s)−1)(q_(s)−1). However, as the actual public key exponent e used for encryption is not revealed to the public, the attacker will not be in a position to compute the exactly matching d_(s) that can successfully decrypt the cipher, thereby defeating spoofing attacks.

Password self encryption in accordance with one or more embodiments of the present invention, defeats spoofing attacks by eliminating open public key exponent and passing only key modulus from server for encryption. Further, web applications can continue authentication of existing users even if RSA cryptosystem is broken in future.

Password Self Encryption in accordance with one or more embodiments of the present invention is applicable to already defined passwords of existing users of web applications. However, when a new user registers himself with an application defining his login credentials, an explicitly defined public key exponent is required as no private key exponent readily exists on the server for decryption.

In case of existing users, a batch program may be run to generate private key exponent d and modulus n for all users from the existing passwords in the user table. Usually, authentication credentials are defined once in their life cycle and continue to be used several times before they expire or are redefined. As web based applications rarely mandate periodical password changes, it is highly beneficial to use password self encryption for registered users while continuing explicit public key encryption for new users. Since every user is assigned a separate key pair, cracking a particular user's key does not compromise the security of other users, thereby providing good resilience to web applications against attacks.

Dependency on certified keys for trust is eliminated for authentication of registered users as encryption by false public key modulus results in unsuccessful decryption.

As the public key exponent is kept confidential to its respective user, post-login traffic is secure in both directions, client to server and vice versa.

Both message integrity and non-repudiation can be achieved with the dual utility of password as a public key and a private credential unique to a user. The same public key exponent can be used for encrypting a hash value (message digest) and also digitally signing messages. A message digest (hash value) may be generated by a user at a client computer by running any standard cryptographic hash function on a plain message to be encrypted. The generated message digest may be encrypted by the public key derived from the password and appended to the message cipher. When both message cipher and message digest cipher are received at the server computer, the message cipher is decrypted first using the private key, and then the same hash function is run on the resulting plain message to obtain the message digest. Further, the message digest cipher is also decrypted using the private key. The message digests obtained both ways are compared for equality, which confirms message integrity. Any inequality indicates tampering of message on its way to the server computer. The equality of message digests also establishes non-repudiation, which proves that the message sender is definitely the password holder and the action can not be repudiated.

Passwords are widely used low-grade secrets that are typically not-so-random and relatively small, and introduce risks of chosen-ciphertext attacks when inappropriately used as cryptographic keys. In this case randomized password padding before encryption thwarts chosen-ciphertext attacks (see RSA, http://en.wikipedia.org/wiki/RSA).

The number of web application users is ever-increasing due to the growing dependency of people on the Internet for communication, consequently resulting into password duplications among users. However, this is not an issue for implementing a password self encryption technique, in accordance with an embodiment of the present invention. While the same password of two different users results into the same public key exponent, the private key exponent and modulus are chosen to be different.

It is possible to use password as a public key in encryption, eliminating the need for explicitly defined and certified public keys. The benefit that this technique imparts to password security is two-fold; while on one hand it defeats factoring attacks on RSA in future, on the other hand it foils the present-day key spoofing attacks.

Using password self encryption in accordance with embodiments of the present invention in conjunction with the existing conventional public key encryptions such as RSA and ECC offers significant security improvements to web authentications.

Message integrity and non-repudiation can be established without separate digital certificates. Post-login two-way communication security can be achieved with the password-cum-public key approach to encryption.

Web applications can be strengthened to be more resilient to attacks by vesting more security in every user login independently, unlike security through a single key pair for the entire user base.

The encryption technique can be implemented in web browsers such as Internet Explorer and Netscape Navigator or at application level.

The concept and method of using a function of the password or any predefined personal secret information as part or whole of the public key may be applied not only to RSA cryptosystem, but also to other public as well as private key cryptosystems.

Also, a public key can be generated not only from a password, but also from any predefined personal secret information such as a credit card number, a driving license number, social security number etc.

Further, the method of encryption can be used to encrypt not only predefined information but also undefined information such as email. Once a user logs into his email application with his password, his email can be encrypted with the key generated from a copy of the password retained on client computer 4.

Although the invention has been described by reference to particular illustrative embodiments thereof, many changes and modifications of the invention may become apparent to those skilled in the art without departing from the spirit and scope of the invention. It is therefore intended to include within this patent all such changes and modifications as may reasonably and properly be included within the scope of the present invention's contribution to the art. 

1. A method comprising: submitting a user identification for a user from a user computer to a server computer; receiving a set of information at the user computer from the server computer, in response to the submission of the user identification for the user; wherein the set of information includes a parameter of a key; and further comprising using the user computer to convert user confidential information to a number x, wherein the number x is dependent on the user confidential information; using the user computer to compute a number e which is a function of x and which is a function of the user confidential information; using the user computer to pad the number x to convert x to X_(p;) using the user computer to encrypt x_(p) by using the parameter of the key and the number e to form a cipher C, wherein C is a function of the user confidential information; and submitting the cipher C from the user computer to the server computer.
 2. The method of claim 1 wherein the parameter of the key is a key modulus.
 3. The method of claim 1 wherein the number e is an odd integer.
 4. The method of claim 1 the cipher C is formed by the formula: C=x_(p) ^(e) mod n.
 5. The method of claim 1 further comprising using the user confidential information as a digital certificate of the user and digitally signing messages using a public key generated from the user confidential information.
 6. The method of claim 5 wherein the user confidential information is a user password.
 7. The method of claim 1 wherein the step of encrypting x_(p) by using the parameter of the key and the number e to form a cipher C is implemented using a layer underlying communication between the user computer and the server computer.
 8. The method of claim 7 wherein the layer includes a web browser.
 9. The method of claim 7 wherein the layer includes a web page.
 10. The method of claim 1 further comprising decrypting messages from the server computer to the user computer using a public key generated from the user confidential information in order to secure information communicated both from the server computer to the user computer and from the user computer to the server computer.
 11. The method of claim 1 wherein the user confidential information is a user password.
 12. The method of claim 1 further comprising encrypting a message digest by using a public key generated from the user confidential information.
 13. The method of claim 12 wherein the user confidential information is a user password.
 14. The method of claim 1 wherein the set of information received from the server computer comprises a part of a public key used for encryption on the user computer.
 15. The method of claim 1 wherein the server computer is comprised of a plurality of computers.
 16. The method of claim 1 further comprising entering the user identification and the user confidential information in a single web page on the user computer; submitting the user identification from the user computer to the server computer, without the user confidential information; and subsequently receiving a further set of information at the user computer, from the server computer, and wherein the step of submitting the cipher C from the user computer to the server computer is performed after the set of information is received at the user computer from the server computer.
 17. The method of claim 1 further comprising entering the user identification in a first web page on a user computer; submitting the user identification from the user computer to the server computer, without the user confidential information; subsequently receiving the set of information at the user computer, from the server computer; entering the user confidential information in a second web page on the user computer after the set of information has been received at the user computer; and wherein the step of submitting the cipher C from the user computer to the server computer is performed after the user confidential information is entered in the second web page of the user computer.
 18. The method of claim 1 further comprising receiving the user confidential information as a text entry into an authentication web page at the user computer prior to using the user computer to convert the user confidential information to the number x; and wherein the user computer uses a text to number conversion scheme to convert the user confidential information to the number x.
 19. The method of claim 18 wherein the user confidential information is a user password. 